<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="task1.js" type="text/javascript"></script>
<title>Insert title here</title>
</head>
<body>
	<script type="text/javascript">
	var arr1 = [3, 'a', 'a', 'a', 2, 3, 'a', 3, 'a', 2, 4, 9, 3];
	
	var currMax = 1;
	var currSymb = arr[0];
	var max = 1;
	var maxSymb = arr[0];
	
	for (var i = 1; i < arr.length; i++) {
		
		if (currSymb == arr[i]) {			
			currMax++;
		} else {
			if (currMax > max) {				
				max = currMax;
				maxSymb = currSymb;
				currSymb = arr[i];
				currMax = 1;
			}
		}
	}
	return (maxSymb + ' (' + max + ' ' + 'times)');
	</script>
</body>
</html>